package rs.pnv.model;

import java.math.BigInteger;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;

import org.hibernate.validator.constraints.NotBlank;

@Entity
@Table(name = "PCC_RESP")
@XmlAccessorType(XmlAccessType.FIELD)
public class PCCResponse extends AbstractEntity {
	
	@NotBlank
	@Column(nullable = false)
	@XmlElement(nillable = false)
	private String result;
	
	@NotBlank
	@Column(nullable = false)
	@XmlElement(nillable = false)
	private BigInteger acquirerOrderId;
	
	@NotNull
	@Column(nullable = false, updatable = false)
	private Date acquirerTimestamp;
	
	@NotBlank
	@Column(nullable = false)
	@XmlElement(nillable = false)
	private BigInteger issuerOrderId;
	
	@NotNull
	@Column(nullable = false, updatable = false)
	private Date issuerTimestamp;
	
	@NotBlank
	@Column(nullable = false)
	@XmlElement(nillable = false)
	private String certificateLocation;
	
	public PCCResponse() {
		
	}	

	public PCCResponse(String result, BigInteger acquirerOrderId,
			Date acquirerTimestamp, BigInteger issuerOrderId,
			Date issuerTimestamp, String certLocation) {
		super();
		this.result = result;
		this.acquirerOrderId = acquirerOrderId;
		this.acquirerTimestamp = acquirerTimestamp;
		this.issuerOrderId = issuerOrderId;
		this.issuerTimestamp = issuerTimestamp;
		this.certificateLocation = certLocation;
	}



	public String getResult() {
		return result;
	}

	public void setResult(String result) {
		this.result = result;
	}

	public BigInteger getAcquirerOrderId() {
		return acquirerOrderId;
	}

	public void setAcquirerOrderId(BigInteger acquirerOrderId) {
		this.acquirerOrderId = acquirerOrderId;
	}

	public Date getAcquirerTimestamp() {
		return acquirerTimestamp;
	}

	public void setAcquirerTimestamp(Date acquirerTimestamp) {
		this.acquirerTimestamp = acquirerTimestamp;
	}

	public BigInteger getIssuerOrderId() {
		return issuerOrderId;
	}

	public void setIssuerOrderId(BigInteger issuerOrderId) {
		this.issuerOrderId = issuerOrderId;
	}

	public Date getIssuerTimestamp() {
		return issuerTimestamp;
	}

	public void setIssuerTimestamp(Date issuerTimestamp) {
		this.issuerTimestamp = issuerTimestamp;
	}

	public String getCertificateLocation() {
		return certificateLocation;
	}

	public void setCertificateLocation(String certificateLocation) {
		this.certificateLocation = certificateLocation;
	}

}
